package com.example.wechat_b.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

/**
 * @author liaoqg
 * @brief description
 * @date 2021-11-01
 */
public class SqliteDatabaseHelper extends SQLiteOpenHelper {


    public SqliteDatabaseHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql1 = "create table jipeng(id INTEGER PRIMARY KEY AUTOINCREMENT,type int,time String,token String)";
        String sql2 = "create table luofukun(id INTEGER PRIMARY KEY AUTOINCREMENT,type int,time String,token String)";
        db.execSQL(sql1);
        db.execSQL(sql2);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
